Go Notes

gobyexample



The first program

package main import "fmt" func main() { fmt.Println("hello world") } To run the program, put the code in hello.go and run in cmd d:go-work >go run hello.go hello world Sometimes we’ll want to build our programs into binaries. We can do this using go build. go build hello.go dir hello hello.go We can then execute the built binary directly. hello world

Imp Sites

Go by Example golang online interpreter Sublime Text + Go Workflow